﻿
<link rel="stylesheet" href="../../../bootstrap/css/bootstrap-datetimepicker.min.css">
<!--<link rel="stylesheet" href="../../../bootstrap/css/bootstrap-datepicker.min.css">-->
<style>
	table, th, td {
		border: 2px solid black;
		border-collapse: collapse; /* 移除单元格之间的间隔 */
	}

	.borderStyle{
		border: 2px solid black;
		border-collapse: collapse; /* 移除单元格之间的间隔 */
	}
</style>

<button  id="mallModal"  data-toggle="modal" data-target=".bd-example-modal-sm"></button>

<div class="modal fade" id="exampleModalLong1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle1" aria-hidden="true">
	<div class="modal-dialog" role="document" style="margin-left:25%">
		<div class="modal-content" style="width:190%">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLongTitle1" >{{modalTitle}}</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">
					<table id="tb4"  class="borderStyle" style="width:100%;" >
						<table  id="tb6" class="borderStyle" >
							<thead style="font-size:25px">
							<tr align="center">
								<th rowspan="2">月份</th>
								<th rowspan="2">单位</th>
								<th colspan="3">比例分析</th>
								<th colspan="3">理赔</th>
							</tr>
							<tr align="center">
								<th>总运费</th>
								<th>大车费用</th>
								<th>所占比例</th>
								<th>公司理赔</th>
								<th>分公司理赔</th>
								<th>合计</th>
							</tr>
							</thead>
							<tbody>
							<tr v-for="(obj,index) in accountantList" align="center">
								<td style="font-size:25px">{{obj.createTime | formatDate}}</td>
								<td style="font-size:25px">{{obj.aname}}</td>
								<td style="font-size:25px">{{obj.totalFreight | formatPrice}}</td>
								<td style="font-size:25px">{{obj.vehicle | formatPrice}}</td>
								<td style="font-size:25px">{{obj.vehicle / obj.totalFreight | formatPriceToFixed}}</td>

								<td style="font-size:25px">{{obj.companyClaims | formatPrice}}</td>
								<td style="font-size:25px">{{obj.branchClaims | formatPrice}}</td>
								<td style="font-size:25px">{{obj.companyClaims+obj.branchClaims | formatPrice}}</td>
							</tr>
							<tr  align="center">
								<td style="font-size:25px" colspan="2">总计：</td>
								<td style="font-size:25px" >{{sumPrice.totalFreight | formatPrice}}</td>
								<td style="font-size:25px" >{{sumPrice.vehicle | formatPrice}}</td>
								<td style="font-size:25px" >{{sumPrice.vehicle / sumPrice.totalFreight | formatPriceToFixed}}</td>

								<td style="font-size:25px" >{{sumPrice.companyClaims | formatPrice}}</td>
								<td style="font-size:25px" >{{sumPrice.branchClaims | formatPrice}}</td>
								<td style="font-size:25px" >{{sumPrice.companyClaims + sumPrice.branchClaims | formatPrice}}</td>
							</tr>

							</tbody>
						</table>

					</table>

			</div>
			<div class="modal-footer">
				<button type="button" id="closeModal1" class="btn btn-secondary" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>


<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
	<div class="modal-dialog" role="document" >
		<div class="modal-content" style="width:120%">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLongTitle" >{{modalTitle}}</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">
				<form>
					<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >消费月份：&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input data-date-format="yyyy-mm" style="width:220px"
									   class="form-control" id="datepicker">
							</div>
						</div>

						<div class="form-group row" >
							<label style="display:inline;margin-top: 3%" >单位：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<select class="form-control" v-model="areaVal" style="width:220px">
									<option v-for="obj in areaList" :value="obj" >{{obj.name}}</option>
								</select>
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >提成：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.commission" style="width:220px"
									   class="form-control"   placeholder="请输入提成">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >保险：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.insurance" style="width:220px"
									   class="form-control"   placeholder="请输入保险">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >经营费用：&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.operate" style="width:220px"
									   class="form-control"   placeholder="请输入经营费用">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >大车费用：&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.vehicle" style="width:220px"
									   class="form-control"   placeholder="请输入大车费用">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >装卸组：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.loadings" style="width:220px"
									   class="form-control"   placeholder="请输入装卸组">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >返程收入：&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.returnIncome" style="width:220px"
									   class="form-control"   placeholder="请输入返程收入">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >总运费：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.totalFreight" style="width:220px"
									   class="form-control"   placeholder="请输入总运费">
							</div>
						</div>

						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >公司理赔：&nbsp;&nbsp;&nbsp;&nbsp;</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.companyClaims" style="width:220px"
									   class="form-control"   placeholder="请输入公司理赔">
							</div>
						</div>
						<div class="form-group row">
							<label style="display:inline;margin-top: 3%" >分公司理赔：</label>
							<div class="col-md-10">
								<input type="text"  v-model.number="accountant.branchClaims" style="width:220px"
									   class="form-control"   placeholder="请输入分公司理赔">
							</div>
						</div>

					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" @click="saveOrUpdate()">保存</button>
				<button type="button" id="closeModal" class="btn btn-secondary" data-dismiss="modal">取消</button>
			</div>
		</div>
	</div>
</div>



				<div class="row">
                    <!-- Styled Table Card-->
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="card table-card">
                            <div class="card-body">
								<table id="tb1"  class="borderStyle" style="width:100%;" >

									<table  id="tb2"  class="borderStyle" style="width:100%" >
										<thead style="text-align: center" >
										<tr>
											<td style="font-size:20px;width: 11%">消费月份:</td>
											<td style="width: 17%">
												<input data-date-format="yyyy-mm" style="border: 1px solid black"
													    id="datepicker3">
											</td>

											<td style="font-size:20px;width: 11%">单位:</td>
											<td style="width: 17%">
												<select   v-model="searchAccountant.aname" style="width: 80%;border: 1px solid black">
													<option  value="">查看全部</option>
													<option v-for="obj in searchAreaList" :value="obj.name">{{obj.name}}</option>
												</select>
											</td>
											<td >
												<button type="button" class="btn btn-primary mt-2 mr-2" @click="searchList">搜索</button>
												<button type="button" class="btn btn-primary mt-2 mr-2"
														data-toggle="modal" data-target="#exampleModalLong" @click="openAdd" >添加</button>
												<button type="button" class="btn btn-primary mt-2 mr-2"
														data-toggle="modal" data-target="#exampleModalLong1" @click="openRatioAnalysis" >比例分析</button>
												<button type="button" class="btn btn-primary mt-2 mr-2" @click="exportAccountant">导出数据</button>
												<button type="button" class="btn btn-primary mt-2 mr-2" @click="openImportAccountant">导入数据</button>
												<input id="importAccountId" type="file" class="file"
													style="width:50px;position: absolute;left: 0;top: 0;opacity: 0;"
																	 @change="importAccountant($event)"/>
												<button type="button" class="btn btn-primary mt-2 mr-2" @click="downloadTemplate">下载导入模板</button>
											</td>
										</tr>

										</thead>

								</table>
                               <table  id="tb3" class="borderStyle" >
									<thead style="font-size:25px">
										<tr align="center">
											<th rowspan="2">月份</th>
											<th rowspan="2">单位</th>
											<th colspan="3">收入</th>
											<th colspan="4">支出</th>
											<th rowspan="2">利润</th>
											<th rowspan="2">返程收入</th>
											<th rowspan="2">总运费</th>
											<th rowspan="2">操作</th>
										</tr>
										<tr align="center">

											<th>提成</th>
											<th>保险费</th>
											<th>合计</th>
											<th>经营费用</th>
											<th>大车费用</th>
											<th>装卸组</th>
											<th>合计</th>
<!--											<th>利润</th>-->
<!--											<th>返程收入</th>-->
<!--											<th>总运费</th>-->
<!--											<th>操作</th>-->
										</tr>
									</thead>
									<tbody>
										<tr v-for="(obj,index) in accountantList" align="center">
											<td style="font-size:25px">{{obj.createTime | formatDate}}</td>
											<td style="font-size:25px">{{obj.aname}}</td>
											<td style="font-size:25px">{{obj.commission | formatPrice}}</td>
											<td style="font-size:25px">{{obj.insurance | formatPrice}}</td>
											<td style="font-size:25px">{{obj.commission+obj.insurance | formatPrice}}</td>
											<td style="font-size:25px">{{obj.operate | formatPrice}}</td>
											<td style="font-size:25px">{{obj.vehicle | formatPrice}}</td>
											<td style="font-size:25px">{{obj.loadings | formatPrice}}</td>
											<td style="font-size:25px">{{obj.operate+obj.vehicle+obj.loadings | formatPrice}}</td>
											<td style="font-size:25px">{{ (obj.commission+obj.insurance) - (obj.operate+obj.vehicle+obj.loadings) | formatPrice}}</td>
											<td style="font-size:25px">{{obj.returnIncome | formatPrice}}</td>
											<td style="font-size:25px">{{obj.totalFreight | formatPrice}}</td>
											<td>
												<div >
													<button type="button" class="btn btn-success mt-2 mr-2"
															@click="openEdit(obj.id)"
															data-toggle="modal" data-target="#exampleModalLong"
														>修改</button>
<!--													<button type="button" class="btn btn-success mt-2 mr-2"-->
<!--															@click="checkDetail(obj.id)"-->
<!--															data-toggle="modal" data-target="#exampleModalLong1"-->
<!--													>查看详情</button>-->

												</div>
											</td>
										</tr>
										<tr  align="center">
											<td style="font-size:25px" colspan="2">总计：</td>
											<td style="font-size:25px" >{{sumPrice.commission | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.insurance | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.income | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.operate | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.vehicle | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.loadings | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.expenditureSum| formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.profitSum | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.returnIncome | formatPrice}}</td>
											<td style="font-size:25px" >{{sumPrice.totalFreight | formatPrice}}</td>
											<td>
											</td>
										</tr>

									</tbody>
								</table>

								</table>

							</div>
                        </div>
                    </div>
                </div>



<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title h4" id="mySmallModalLabel">导入提示</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">×</span>
				</button>
			</div>
			<div class="modal-body" style="color:red">
				<div v-for="msg in importMsg">{{msg}}</div>
			</div>
		</div>
	</div>
</div>

<script src="../../../bootstrap/js/bootstrap-datepicker.min.js"></script>
<script src="../../../bootstrap/js/bootstrap-datepicker.zh-CN.min.js"></script>



<script>

	new Vue({
		el:"#app",
		data:{
			accountantList:[],
			modalTitle: '',
			importMsg: '',
			searchAccountant: {"aname":"","createTime":null},
			accountant: {"commission":0,"insurance":0,"operate":0,"vehicle":0,"loadings":0,"companyClaims":0,"branchClaims":0,
								"returnIncome":0,"totalFreight":0,"companyClaims":0,"branchClaims":0},
			searchAreaList: [],
			areaList:[],
			areaVal: "",
			sumPrice: {"commission":0,"insurance":0,"operate":0,"vehicle":0,"loadings":0,"expenditureSum":0,"income":0,"companyClaims":0,"branchClaims":0,
				"returnIncome":0,"totalFreight":0,"companyClaims":0,"branchClaims":0,"profitSum":0}
		},
		created:function (){
			this.getPrepareList()
		},
		methods:{

			getPrepareList:function () {
				this.selectList()
				this.searchArea()
				$("#tb1").css("border","2px solid black")
				$("#tb1 tr").css("border","2px solid black")
				$("#tb1 tr td").css("border","2px solid black")
				$("#tb1 tr th").css("border","2px solid black")
				$("#tb2").css("border","2px solid black")
				$("#tb2 tr").css("border","2px solid black")
				$("#tb2 tr td").css("border","2px solid black")
				$("#tb2 tr th").css("border","2px solid black")
				$("#tb3").css("border","2px solid black")
				$("#tb3 tr").css("border","2px solid black")
				$("#tb3 tr td").css("border","2px solid black")
				$("#tb3 tr th").css("border","2px solid black")

				$("#tb4").css("border","2px solid black")
				$("#tb4 tr").css("border","2px solid black")
				$("#tb4 tr td").css("border","2px solid black")
				$("#tb4 tr th").css("border","2px solid black")
				$("#tb5").css("border","2px solid black")
				$("#tb5 tr").css("border","2px solid black")
				$("#tb5 tr td").css("border","2px solid black")
				$("#tb5 tr th").css("border","2px solid black")
				$("#tb6").css("border","2px solid black")
				$("#tb6 tr").css("border","2px solid black")
				$("#tb6 tr td").css("border","2px solid black")
				$("#tb6 tr th").css("border","2px solid black")
			},
			selectList:function () {

				let date = new Date()
				if($("#datepicker3").val()!=''){
					date = new Date($("#datepicker3").val())
				}
				let month = date.getMonth()+1;
				if(month<10){
					month = "0"+month
				}
				this.searchAccountant.createTime = date.getFullYear()+"-"+month+"-01"

				axios.post(
						"/admin/accountant/getList/",this.searchAccountant
				).then(response=>{
					this.accountantList = response.data
					this.sumVal()
				})
			},
			searchArea:function (){
				axios.get(
						"/admin/area/selectListAll"
				).then(response=>{
					this.searchAreaList = response.data
				})
			},
			searchList:function (){
				this.searchAccountant.createTime = ""
				if($("#datepicker3").val()!=''){
					let date = new Date($("#datepicker3").val())
					let month = date.getMonth()+1;
					if(month<10){
						month = "0"+month
					}
					let searchMonth = date.getFullYear()+"-"+month+"-01"
					this.searchAccountant.createTime = searchMonth;
				}

				this.selectList()
			},
			openAdd:function (){
				this.modalTitle = "添加"
				this.accountant = {"commission":0,"insurance":0,"operate":0,"vehicle":0,"loadings":0,"companyClaims":0,"branchClaims":0,
					"returnIncome":0,"totalFreight":0,"companyClaims":0,"branchClaims":0}
				this.areaVal = {}
				this.selectArea()
			},
			openEdit:function (id){
				this.modalTitle = "修改"
				this.accountant = {"commission":0,"insurance":0,"operate":0,"vehicle":0,"loadings":0,"companyClaims":0,"branchClaims":0,
					"returnIncome":0,"totalFreight":0,"companyClaims":0,"branchClaims":0}
				this.areaVal = {}
				this.selectArea()
				this.findById(id)
			},
			findById:function (id){
				axios.get(
						"/admin/accountant/findById/"+id,
				).then(response=>{
					this.accountant = response.data
					this.areaVal.id = this.accountant.aid
					this.areaVal.name = this.accountant.aname
					$("#datepicker").val(this.formatDateVal(this.accountant.createTime))
				})
			},
			selectArea:function (){
				axios.get(
						"/admin/area/selectListAll"
				).then(response=>{
					this.areaList = response.data
				})
			},
			checkDetail:function (id){
				this.openEdit(id)
				this.modalTitle = "详情"
				this.detail = 1
			},
			saveOrUpdate:function (){
				let month = parseInt($("#datepicker").val().split("-")[1])
				console.log(month)
				if(month>=10){
					this.accountant.createTime = $("#datepicker").val()+"-01"
				}else{
					this.accountant.createTime = parseInt($("#datepicker").val().split("-")[0])+"-0"+month+"-01"
				}
				this.accountant.aid = this.areaVal.id
				this.accountant.aname = this.areaVal.name
				axios.post("/admin/accountant/saveOrUpdate",this.accountant).then(response=>{
					if(response.data==true){
						$("#closeModal").click()
						this.getPrepareList()
					}else{
						alert("月份和单位已存在，不能重复添加！");
					}

				})
			},
			sumVal:function (){

				this.sumPrice = {"commission":0,"insurance":0,"operate":0,"vehicle":0,"loadings":0,"expenditureSum":0,"income":0,
					"companyClaims":0,"branchClaims":0,
					"returnIncome":0,"totalFreight":0,"companyClaims":0,"branchClaims":0,"profitSum":0}

				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.commission = this.sumPrice.commission + this.accountantList[i].commission
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.insurance = this.sumPrice.insurance + this.accountantList[i].insurance
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.income = this.sumPrice.income + (this.accountantList[i].commission + this.accountantList[i].insurance)
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.operate = this.sumPrice.operate + this.accountantList[i].operate
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.vehicle = this.sumPrice.vehicle + this.accountantList[i].vehicle
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.loadings = this.sumPrice.loadings + this.accountantList[i].loadings
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.expenditureSum = this.sumPrice.expenditureSum + (this.accountantList[i].operate + this.accountantList[i].vehicle + this.accountantList[i].loadings)
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.profitSum = this.sumPrice.profitSum +(this.accountantList[i].commission+this.accountantList[i].insurance) - (this.accountantList[i].operate+this.accountantList[i].vehicle+this.accountantList[i].loadings)
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.returnIncome = this.sumPrice.returnIncome + this.accountantList[i].returnIncome
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.totalFreight = this.sumPrice.totalFreight + this.accountantList[i].totalFreight
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.companyClaims = this.sumPrice.companyClaims + this.accountantList[i].companyClaims
				}
				for (let i = 0; i < this.accountantList.length; i++) {
					this.sumPrice.branchClaims = this.sumPrice.branchClaims + this.accountantList[i].branchClaims
				}
			},
			openRatioAnalysis:function (){

			},
			exportAccountant:function (){
				this.searchAccountant.createTime = null
				if($("#datepicker3").val()!=''){
					let date = new Date($("#datepicker3").val())
					let month = date.getMonth()+1;
					if(month<10){
						month = "0"+month
					}
					let searchMonth = date.getFullYear()+"-"+month+"-01"
					this.searchAccountant.createTime = searchMonth;
				}
				window.location.href = "/admin/accountant/export?aname="+this.searchAccountant.aname+"&createTime="+this.searchAccountant.createTime;
			},
			openImportAccountant:function (){
				$("#importAccountId").click();
			},
			importAccountant:function (val){
				const form=new FormData();
				form.append("importAccountantFile",val.target.files[0]);
				axios.post("/admin/accountant/importAccountant",form).then(response=>{
					this.importMsg = response.data.list;
					$("#mallModal").click();
					$("#importAccountId")[0].value='';
					let fileInput = document.getElementById('importAccountId');
					fileInput.value = ''; // 清除文件输入的值
					this.getPrepareList()
				})
			},
			downloadTemplate:function (){
				window.location.href = "/admin/accountant/downloadTemplate"
			},
			formatDateVal(value) {
				let date = new Date(value)
				return date.getFullYear()+"-"+(date.getMonth()+1);
			}
		},
		filters: {
			formatDate(value) {
				let date = new Date(value)
				//return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
				return date.getFullYear()+"-"+(date.getMonth()+1);
			},
			formatPrice(price){
				let priceStr = price+''
				const thousandSeparated = priceStr.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
				return thousandSeparated;
			},
			formatPriceToFixed(price){
				price = price.toFixed(2)
				let priceStr = price+''
				const thousandSeparated = priceStr.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
				return thousandSeparated+"%";
			}
		}
	});

	$('#datepicker').datepicker({
		weekStart: 1,
		daysOfWeekHighlighted: "6,0",
		autoclose: true,
		todayHighlight: true,
		language: "zh-CN"
	});
	$('#datepicker').datepicker("setDate", new Date());


	$('#datepicker2').datepicker({
		weekStart: 1,
		daysOfWeekHighlighted: "6,0",
		autoclose: true,
		todayHighlight: true,
		language: "zh-CN",
		clearBtn: true
	});
	// $('#datepicker2').datepicker("setDate", new Date());

	$('#datepicker3').datepicker({
		// weekStart: 1,
		format: 'yyyy-mm',
		startView: 1,
		// daysOfWeekHighlighted: "6,0",
		autoclose: true,
		maxViewMode: 2,
		minViewMode: 1,
		//todayHighlight: true,
		language: "zh-CN",
		// clearBtn: true
	});
	$('#datepicker3').datepicker("setDate", new Date());

</script>

